<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>实时线损管理</title>
		<link rel="stylesheet" media="screen" href="css/index.css">
		<link rel="icon" href="img/icon.jpg" >
	</head>
	<body>
	
<!-- 	
		<div class="topLe">2019年6月24日 09:12&nbsp;&nbsp;&nbsp; |
			<span onClick="loginShow()"><img src="img/bg/toLogin.png" /> 个人中心</span>
		</div> -->
		<img class="bgCircle2" src="img/bg/bgCircle2.png" />
		<img class="bgCircle3" src="img/bg/bgCircle3.png" />
		<img class="bgCircle4" src="img/bg/bgCircle4.png" />
		<div class="content">
			<div class="bidTitle">实时线损管理登录</div>
			<div class="logCon">
				<div class="line"><span>账号:</span>
				<input class="bt_input" type="text" id="name"></div>
				<div class="line"><span>密码:</span>
				<input class="bt_input" type="password" id="password"></div>
				<button type="button" class="logingBut" onclick="login()" id="loginadmin">登录</button>
			</div>
		</div>

	
<!-- 		<div class="loginModel" id="loginModel">
			<div class="loginm">
				<div>智慧安平 · 运营登录</div>
				<img class="close" src="img/bg/close.png" />
				<input type="text" placeholder="请输入您的账号" />
				<input type="password" placeholder="请输入您的密码" />
				<button type="button">登录</button>
			</div>
		</div> -->
		<script src="js/jquery-3.4.1.js"></script>
		<script>
			$(document).keydown(function (event) {
				if (event.keyCode == 13) {
					$("#loginadmin").click();
				}
			});
		    function login() {
		        $.post("user/login",{"name":$("#name").val(),"password":$("#password").val()},function (result) {
		                if(result == 1){
		                    alert("登录成功！");
		                    location.href='admin.jsp';
		                }else{
		                    alert("登录失败！账号密码有误！")
		                }
		            })
		    }
		</script>
	</body>
</html>
